package com.bruce.demo2.patterns.demo2.structural.demo12.flyweight.demo2;

/**
 * @PROJECT_NAME: design_patterns
 * @DESCRIPTION: 享元角色 坦克的速度与射速
 * @AUTHOR: CNBruceLee
 * @DATE: 2021/8/2 21:53
 */
public class Flyweight {
    /**
     * 解释说明
     */
    private String explain;
    /**
     * 单位
     */
    private String unit;

    public Flyweight(String explain, String unit) {
        this.explain = explain;
        this.unit = unit;
    }

    public void operation(int value, String option) {
        System.out.println(explain + ":" + value + "" + unit + " :" + option);
    }
}
